import { computed, Ref } from 'vue'
import { Widget } from '@/models'
import { DateFormatList } from '@/types'

/** 日期格式 */
export default function useDateFormat(data: Ref<Widget>) {
  return computed(() => DateFormatList.find(item => item.value === data.value.dateFormat) || DateFormatList[0])
}
